package com.noah.note.global;

/**
 * Created by Administrator on 2017/10/29 0029.
 */

public class Const {
    //**************其它常量**************
    public static final String BASE_WEB_SOCKET="ws://106.13.70.118/ws";//websocket host
    public static final String BASE_HOST ="http://106.13.70.118";//host
    public static final int BASE_NETTY_PORT =8090;//netty_port
    //    public static final String BASE_HOST ="http://198.13.40.26:8080";//host
    public static final String UPLOAD_FILE ="file";//上传文件名称
    public static final String IMG_PATH ="/img/";//上传文件名称

    public static final String SP_USERNAME ="SP_USERNAME";//记录用户名
    public static final String SP_PASSWORD ="SP_PASSWORD";//记录密码
    public static final String SP_TOKEN ="SP_TOKEN";//记录登录token

    public static final int ARG1_IS_REFRESH_LOAD = 10;
    public static final int ARG1_IS_NORMAL_LOAD = 11;
    public static final int ARG2_IS_LOAD_SUCCESS = 12;
    public static final int ARG2_IS_LOAD_FAIL = 13;
    //**************返回code**************
    public static final int SUCCESS = 1;//成功
    public static final int FAIL = 0;//失败
    public static final int ERROR_ALREADY = -1;//已经存在
    public static final int ERROR_USERNAME = -1;//账号错误
    public static final int ERROR_PASSWORD = -2;//密码错误
    public static final int FAIL_NONE = -3;//不存在
    public static final int FAIL_REQUEST = -4;//请求异常
    public static final int NET_ERROR = -999;//没有网络
    public static final int FAIL_TOKEN = -10;//token失效



    //************API************
    public static final String API_REGISTER ="/api/register";//注册
    public static final String API_LOGIN ="/api/login";//登录
    public static final String API_ALL_USER ="/api/allUser";//获取全部用户
    public static final String API_GET_USER="/api/getUser";//根据id获取单个用户

    public static final String API_ADD_BOOK ="/api/addBook";//添加日记本
    public static final String API_DELETE_BOOK ="/api/deleteBook";//删除日记本
    public static final String API_UPDATE_BOOK ="/api/updateBook";//更新日记本
    public static final String API_GET_BOOK_LIST ="/api/getBookList";//根据uid获取日记本列表
    public static final String API_GET_BOOK ="/api/getBook";//根据bid获取单个日记本

    public static final String API_ADD_NOTE ="/api/addNote";//添加日记
    public static final String API_DELETE_NOTE ="/api/deleteNote";//删除日记
    public static final String API_UPDATE_NOTE ="/api/updateNote";//更新日记
    public static final String API_GET_NOTE_LIST ="/api/getNoteList";//获取日记列表20条(传入最后一条时间,不传bid所有人的日记,传bid则是日记本内的日记)
    public static final String API_GET_NOTE ="/api/getNote";//根据nid获取日记

    public static final String API_ADD_MARK ="/api/addMark";//关注日记
    public static final String API_DELETE_MARK ="/api/deleteMark";//取消关注
    public static final String API_GET_MARK_NOTE_LIST ="/api/getMarkNoteList";//根据uid获取关注的日记列表

    public static final String API_ADD_COMMENT ="/api/addComment";//发表评论
    public static final String API_DELETE_COMMENT ="/api/deleteComment";//删除评论
    public static final String API_UPDATE_COMMENT ="/api/updateComment";//更新评论
    public static final String API_GET_COMMENT_LIST ="/api/getCommentList";//根据nid获取评论列表
    public static final String API_GET_COMMENT ="/api/getComment";//根据cid获取评论

    public static final String API_UPLOAD ="/api/upload";//上传文件
    public static final String API_WEB_SOCKET ="/ws";//websocket接口
    public static final String CLIENT_TO_SERVER ="c2s";//socket客户端向服务端发消息
    public static final String SERVER_TO_CLIENT ="s2c";//socket服务端向客户端发消息
    public static final String CLIENT_TO_SERVER_GROUP ="c2s_group";//socket客户端向服务端发群消息
    public static final String SERVER_TO_CLIENT_GROUP ="s2c_group";//socket服务端向客户端发群消息

    //*****************start客户端服务端共同类型*************
    //=====start传输类型相关=====
    //基本操作
    public static final int NOTIFY = 1;//通知
    public static final int GET_MY_USER = 2;//获取自己的用户信息
    public static final int GET_OFFLINE_MSG = 3;//获取离线信息
    public static final int SEND_MSG_TXT = 51;//发送文字信息
    public static final int SEND_MSG_IMG = 52;//发送图片信息
    public static final int SEND_MSG_MP3 = 53;//发送语音信息
    public static final int SEND_MSG_MP4 = 54;//发送视频信息
    public static final int USER_ONLINE = 5;//每次上线都要发
    public static final int USER_OFFLINE = 6;//自己下线,或者别人下线通知我
    public static final int INIT_ALL = 7;//初始化(刷新用户,群组,获取离线消息)
    public static final int SET_MY_USER = 8;//设置自己的信息
    public static final int UPDATE_USER = 9;//告诉别人需要更新信息
    //用户相关操作
    public static final int ADD_USER_REQ = 10;//添加用户好友
    public static final int ADD_USER_OK = 11;//添加用户好友
    public static final int ADD_USER_REFUSE = 12;//添加用户好友
    public static final int DEL_USER = 13;//删除用户好友
    public static final int BLACK_USER = 14;//拉黑用户好友
    public static final int GET_USER = 15;//根据id获取用户信息
    public static final int GET_USER_LIST = 16;//获取自己的用户列表
    public static final int GET_SEARCH_USER_SIZE = 17;//获取搜索用户的列表总数
    public static final int GET_SEARCH_USER_LIST = 18;//获取搜索用户的列表
    //群组相关操作
    public static final int CREATE_GROUP = 30;//建立新群组
    public static final int REMOVE_GROUP = 31;//移除群组
    public static final int MODIFY_GROUP = 32;//修改群组
    public static final int GET_GROUP_LIST = 34;//获取自己的群组列表
    public static final int GET_GROUP_USER_LIST = 35;//获取自己的群组列表
    public static final int GET_SEARCH_GROUP_SIZE = 36;//获取搜索的群组列表总数
    public static final int GET_SEARCH_GROUP_LIST = 37;//获取搜索的群组列表
    public static final int GROUP_ADD_USER = 38;//群组主动加用户
    public static final int GROUP_DEL_USER = 39;//群组删除用户
    public static final int JOIN_GROUP = 40;//用户加入群组
    public static final int QUIT_GROUP = 41;//用户退出群组
    //*****************end客户端服务端共同类型*************
}
